package com.aboo.action;

import com.aboo.domain.AdminClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping(value = "/admin")
public class AdminAction {

    @Resource
    AdminClient adminClient;

    @PostMapping(value = "/getName")
    public String getName() {
        String name = adminClient.getName();
        log.info("name:{}", name);
        System.out.println("name:" + name);
        return name;
    }

}
